package com.uchengwang.ui.self.banner.holder;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;

import com.uchengwang.functions.image.ImageManager;


/**
 * Created by Sai on 15/8/4.
 * res资源图片Holder例子 convenientBanner顶部viewpager滚动页
 */
public class LocalImageHolderView implements Holder<Integer> {
    private ImageView imageView;
    @Override
    public View createView(Context context) {
        imageView = new ImageView(context);
        imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
        return imageView;
    }

    @Override
    public void UpdateUI(Context context, int position, Integer data) {
        ImageManager.getInstance().loadImage(context, imageView, data, ImageManager.ImageType.NARMOL);
    }
}
